package com.crm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author crm
 * @since 2020-06-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class RoleModule extends Model<RoleModule> {

    private static final long serialVersionUID = 1L;

    /**
     * 角色模块表id
     */
    @TableId(value = "rmid", type = IdType.AUTO)
    private Integer rmid;

    /**
     * 角色表id
     */
    private Integer rid;

    /**
     * 模块表id
     */
    private Integer mid;


    @Override
    protected Serializable pkVal() {
        return this.rmid;
    }

    public RoleModule(Integer rid, Integer mid) {
        this.rid = rid;
        this.mid = mid;
    }
}
